package cn.johnyu.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/users")
public class UserController {
    @GetMapping
    public String findAllUsers(){
        return "所有的用户";
    }
    @GetMapping("/{id}")
    public String loadUser(@PathVariable("id") int id){
        return "查找到用户： "+id;
    }
}
